import request from '@/utils/request';

// 查询公告列表
export const listNotice = (query: any) => {
  return request({
    url: '/system/notice/list',
    method: 'get',
    params: query
  });
}

// 查询公告详细
export const getNotice = (noticeId: any) => {
  return request({
    url: `/system/notice/${noticeId}`,
    method: 'get'
  });
}

// 新增公告
export const addNotice = (data: any) => {
  return request({
    url: '/system/notice',
    method: 'post',
    data: data
  });
}

// 修改公告
export const updateNotice = (data: any) => {
  return request({
    url: '/system/notice',
    method: 'put',
    data: data
  });
}

// 删除公告
export const delNotice = (noticeId: any) => {
  return request({
    url: `/system/notice/${noticeId}`,
    method: 'delete'
  });
}
